package com.hop.thread.safe;

/**
 * 
 * @author Administrator
 *
 */
public class DrawMoneyWaitThread extends Thread{
	
	private Account account;
	
	private double amount;
	
	public DrawMoneyWaitThread(String threadName,Account account,double amount){
		super(threadName);
		this.account = account;
		this.amount = amount;
	}
	
	public void run(){
		for(int i =0; i<100; i++){
			account.draw(amount, i);
		}
	}
}
